# OpenCV GUI wondows as a class.

##################################################
# does importing modules everywhere use extra memory?
import cv # opencv bindings; installed in package manager
import sys # system specific crap, LIKE sys.argv etc.
import os # system interfaces
import string
import numpy
##################################################
from HelperFunctions import *
from WormCountConfigs import *
##################################################

class GuiWindow:

  def __init__(self,wind1, autoscale = True, rows = 100, cols = 100):
    self.wind1 = wind1 #bad name, it's a carryover from sjhrgjshd and ill be changed
    self.autoscale = autoscale
    self.framebuffer = cv.CreateMat(rows,cols,0)
    # i have no idea what the color parameter is. zero workd=s with forced greyscale.
    # I actually have no idea what the namespace shit for windows will be like.
    cv.NamedWindow(wind1,flags=self.autoscale)

    # so let's save the refactoring until all of the features have been put in!
    # it's gonna sucksucksuck gag vomit